﻿@model mBlog.ViewModels.ListView<mBlog.Admin.ViewModels.PostSummaryView>
@{
    ViewBag.Title = "Posts";
}
<h2>
    Posts</h2>
<table id="postsTable" cellspacing="0">
    <tr>
        <th>
            Actions
        </th>
        <th>
            Title
        </th>
        <th>
            Category
        </th>
        <th>
            Tags
        </th>
        <th>
            Comments
        </th>
    </tr>
    <tbody>
        @foreach (var post in Model.List)
        {
            <tr>
                <td>
                    @Html.ActionLink("Delete", "Delete", new { postId = post.ID })
                </td>
                <td>
                    <strong>@Html.RouteLink(linkText: post.Name,
                                 routeName: "EditPost",
                                        routeValues: new { postid = post.ID })</strong>
                </td>
                <td>
                   <a href="@post.CategoryUrl">@post.CategoryName</a>
                </td>
                <td>
                   
                </td>
                <td>@post.PostedTime
                </td>
            </tr>
        }
    </tbody>
</table>
@{Html.RenderPartial("PostPager", Model.Pager);}
